import 'package:xin_nuo_pda/bean/eqp_info_entity.dart';

eqpInfoEntityFromJson(EqpInfoEntity data, Map<String, dynamic> json) {
	if (json['EQUIPMENT'] != null) {
		data.eQUIPMENT = EqpInfoEQUIPMENT().fromJson(json['EQUIPMENT']);
	}
	return data;
}

Map<String, dynamic> eqpInfoEntityToJson(EqpInfoEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['EQUIPMENT'] = entity.eQUIPMENT?.toJson();
	return data;
}

eqpInfoEQUIPMENTFromJson(EqpInfoEQUIPMENT data, Map<String, dynamic> json) {
	if (json['OBJECTRRN'] != null) {
		data.oBJECTRRN = json['OBJECTRRN'] is String
				? int.tryParse(json['OBJECTRRN'])
				: json['OBJECTRRN'].toInt();
	}
	if (json['EQUIPMENTID'] != null) {
		data.eQUIPMENTID = json['EQUIPMENTID'].toString();
	}
	if (json['DESCRIPTION'] != null) {
		data.dESCRIPTION = json['DESCRIPTION'].toString();
	}
	if (json['LOCATION'] != null) {
		data.lOCATION = json['LOCATION'].toString();
	}
	if (json['DEPARTMENT'] != null) {
		data.dEPARTMENT = json['DEPARTMENT'].toString();
	}
	if (json['EQPTYPE'] != null) {
		data.eQPTYPE = json['EQPTYPE'].toString();
	}
	if (json['STATUSMODELRRN'] != null) {
		data.sTATUSMODELRRN = json['STATUSMODELRRN'] is String
				? int.tryParse(json['STATUSMODELRRN'])
				: json['STATUSMODELRRN'].toInt();
	}
	if (json['MODEL'] != null) {
		data.mODEL = json['MODEL'].toString();
	}
	if (json['COMCLASS'] != null) {
		data.cOMCLASS = json['COMCLASS'].toString();
	}
	if (json['STATE'] != null) {
		data.sTATE = json['STATE'].toString();
	}
	if (json['SUBSTATE'] != null) {
		data.sUBSTATE = json['SUBSTATE'].toString();
	}
	if (json['HOLDSTATE'] != null) {
		data.hOLDSTATE = json['HOLDSTATE'].toString();
	}
	if (json['ISBATCH'] != null) {
		data.iSBATCH = json['ISBATCH'].toString();
	}
	if (json['ISMULTIPART'] != null) {
		data.iSMULTIPART = json['ISMULTIPART'].toString();
	}
	if (json['STYLE'] != null) {
		data.sTYLE = json['STYLE'] is String
				? int.tryParse(json['STYLE'])
				: json['STYLE'].toInt();
	}
	if (json['CREATED'] != null) {
		data.cREATED = json['CREATED'].toString();
	}
	if (json['UPDATED'] != null) {
		data.uPDATED = json['UPDATED'].toString();
	}
	if (json['UPDATEDBY'] != null) {
		data.uPDATEDBY = json['UPDATEDBY'].toString();
	}
	if (json['CURRENTPARTNAME'] != null) {
		data.cURRENTPARTNAME = json['CURRENTPARTNAME'].toString();
	}
	if (json['ISAVAILABLE'] != null) {
		data.iSAVAILABLE = json['ISAVAILABLE'];
	}
	if (json['ISBATCHLOTSIZECONTROL'] != null) {
		data.iSBATCHLOTSIZECONTROL = json['ISBATCHLOTSIZECONTROL'];
	}
	return data;
}

Map<String, dynamic> eqpInfoEQUIPMENTToJson(EqpInfoEQUIPMENT entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['OBJECTRRN'] = entity.oBJECTRRN;
	data['EQUIPMENTID'] = entity.eQUIPMENTID;
	data['DESCRIPTION'] = entity.dESCRIPTION;
	data['LOCATION'] = entity.lOCATION;
	data['DEPARTMENT'] = entity.dEPARTMENT;
	data['EQPTYPE'] = entity.eQPTYPE;
	data['STATUSMODELRRN'] = entity.sTATUSMODELRRN;
	data['MODEL'] = entity.mODEL;
	data['COMCLASS'] = entity.cOMCLASS;
	data['STATE'] = entity.sTATE;
	data['SUBSTATE'] = entity.sUBSTATE;
	data['HOLDSTATE'] = entity.hOLDSTATE;
	data['ISBATCH'] = entity.iSBATCH;
	data['ISMULTIPART'] = entity.iSMULTIPART;
	data['STYLE'] = entity.sTYLE;
	data['CREATED'] = entity.cREATED;
	data['UPDATED'] = entity.uPDATED;
	data['UPDATEDBY'] = entity.uPDATEDBY;
	data['CURRENTPARTNAME'] = entity.cURRENTPARTNAME;
	data['ISAVAILABLE'] = entity.iSAVAILABLE;
	data['ISBATCHLOTSIZECONTROL'] = entity.iSBATCHLOTSIZECONTROL;
	return data;
}